year = eval(input("请输入年份："))
month = eval(input("请输入月份（1-12）："))
day = eval(input("请输入这个月的是哪天："))

if month==1 or month ==2:
    month += 12
    year -= 1

j = (year / 100) // 1
k = year % 100

h = ( day + ( ( 26 * (month +1) ) / 10 )  // 1 + k + (k/4)//1 + (j / 4)//1 + 5*j ) % 7

if h == 0:
    print("这周的",day,"日是星期六")
elif h==1:
    print("这周的", day, "日是星期天")
elif h == 2:
    print("这周的", day, "日是星期一")
elif h == 3:
    print("这周的", day, "日是星期二")
elif h == 4:
    print("这周的", day, "日是星期三")
elif h == 5:
    print("这周的", day, "日是星期四")
elif h == 6:
    print("这周的", day, "日是星期五")
else:
    print("错误")
